package com.snail.jj.androiddemos.javabasic;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.View;

import com.snail.jj.androiddemos.R;
import com.snail.jj.androiddemos.bases.BaseActivity;
import com.snail.jj.androiddemos.interfaces.Live;

/**
 * Created by snail on 2017/4/24.
 */

public class InterfaceActivity extends BaseActivity implements Live {

    private final static String TAG = "InterfaceActivity";


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_interface);
        setTitleBarTitle("Interface");
        setRightViewVisiable(View.INVISIBLE);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        spendMoney(10000);
    }

    @Override
    protected void onPause() {
        super.onPause();
        makeMoney(10000000);
    }

    /**
     * @param money 挣得钱数
     * @author snail
     */
    @Override
    public void makeMoney(int money) {
        Log.i(TAG,"Make" + money + "money");
    }

    /**
     * @param money 花的钱数
     * @author snail
     */
    @Override
    public void spendMoney(int money) {
        Log.i(TAG,"Spend" + money + "money");
    }

    @Override
    public void talkToBoss() {
        Log.i(TAG,"talkToBoss");
    }

    @Override
    public void talkToFather() {
        Log.i(TAG,"talkToFather");
    }

    @Override
    public void goodLife() {
        Log.i(TAG,"goodLife");
    }
}
